package com.wanxi.springboot.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.sql.DataSource;
import java.sql.SQLException;

@RestController
public class TestController {

    @Autowired
    private DataSource dataSource;
    @GetMapping
    public Object user() throws SQLException {
        System.out.println(dataSource);
        System.out.println(dataSource.getConnection());
        return "张三";
    }
}
